<?php
//get userinfo
$user = Blyn::app()->getCurrentUser();
$mobile = '';
$name = '';
$memberPoint = '';
$mobileAttr = $user->getAttribute('userInfo.mobile');
if ($mobileAttr != NULL) {
    $mobile = $mobileAttr->getValue();
    $memberPointCooker = new BAMemberPointCooker();
    $memberPointAccount = $memberPointCooker->getMemberPointAccountByUser();
    $memberPoint = $memberPointAccount->getItem('memberPoint')->getValue();
}
$nameAttr = $user->getAttribute('userInfo.name');
if ($nameAttr != NULL) {
    $name = $nameAttr->getValue();
}
?>
<?php echo $control->renderView("header"); ?>

<div id="page_card" class="div-body">

    <div id="mappContainer">
        <div class="inner root" style="height: 519px;">
            <div class="card" style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/card_bk_1.png'?>) no-repeat 0 0;-webkit-background-size:267px 159px;background-size:267px 159px;" data-card-type="0">
                <img src="<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/weixin_shop_logo/2543529110_card_170_170.png'?>" class="logo">
                <h1></h1>
                <strong class="pdo verify"><span style="color:#92714e;text-shadow:0 1px #f1e7dc;"><em style="color:#92714e;text-shadow:0 1px #f1e7dc;">会员卡号</em><?php echo $user->getId();?></span></strong>
            </div>

            <p><span>使用时向服务员出示此卡</span></p>

            <ul class="round" id="customs2" style="display: none;"></ul>

            <ul class="round" id="privates">
                <li style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/icon_score.png'?>) no-repeat 9px 14px;-webkit-background-size:24px 21px;background-size:24px 21px;">
                    <a style="background-size: 0px;" class="score" href="#" >我的积分:<?php echo $memberPoint;?>分<span hidden="">null</span><i hidden="">null</i></a>
                </li>
            </ul>

            <ul class="round" id="customs">
                <li>
                    <a href="#" style="background-size: 0px;">会员信息</a>
                </li>
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>姓名：<?php echo $name; ?>
                            </p>
                        </a>
                    </article>
                </li>
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>联系电话：<?php echo $mobile; ?>
                            </p>
                        </a>
                    </article>
                </li>
            </ul>

            <a href="javascript:void(0)" class="helpTel">使用会员卡遇到了问题？</a>
        </div>
        <div class="footFix" id="modal"></div>
    </div>

    <?php echo $control->renderView("footer"); ?>

</div>
